x86/xsave: provide guests with finit-like environment
authorJan Beulich <jbeulich@suse.com>
Fri, 18 Nov 2011 08:22:45 +0000 (09:22 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 18 Nov 2011 08:22:45 +0000 (09:22 +0100)
commit04678eb8f30a83620fa2c960431dfe4fb40d86f2
treec2caef081e1024ab7b765435f108b025f5aa12aa
parent8eca0db0e836a081d873de7e9eefb3763f065780
x86/xsave: provide guests with finit-like environment

Without the use of xsave, guests get their initial floating point
environment set up with finit. At least NetWare actually depends on
this (in particular on all exceptions being masked), so to be
consistent set the same environment also when using xsave. This is
also in line with all SSE exceptions getting masked initially.

To avoid further fragile casts in xstate_alloc_save_area() the patch
also changes xsave_struct's fpu_see member to have actually usable
fields.

The patch was tested in its technically identical, but modified-file-
wise different 4.1.2 version.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Charles Arnold <carnold@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/i387.c
xen/arch/x86/xstate.c
xen/include/asm-x86/xstate.h